home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Network Support Library
/
RoseWare - Network Support Library.iso
/
apidev
/
logdis.arc
/
LOGDISP.DOC
< prev
next >
Wrap
Text File
|
1990-09-06
|
4KB
|
101 lines
LOGDISP - A Novell Netware Display Utility
* Author - William Stackpole
Puget Sound Naval Shipyard
Dept of the Navy
Code 114.4 Bldg 443
Bremerton, Wa 98314-5000
* Date - 08/29/90
* Written in MSC v5.1
Purpose:
Displays an ASCII text file if a specified period of time has
passed since the user's last login.
Usage:
To limit system information or news files to once a day displays
or to remind users that they need to login more frequently to
check their E-Mail, etc.
Syntax:
LOGDISP [nnn] [d:][\path\]filename.ext [-w[tt]] [-n]
Where:
nnn is the time period in minutes that must have passed since
the last login before the text file is displayed. The default
is 240 minutes (4 hours).
[d:] is the optional drive or volume designator.
[\path\] is the optional directory path.
filename.exe is the text filename and extension.
[-w] is the wait option. If specified, LOGDISP will pause for
20 seconds or until a key is pressed which ever comes first.
The [tt] option can be used to alter the wait time. [tt] is the
time in seconds you want LOGDISP to wait. A value of 0 will cause
LOGDISP to wait until a key is pressed (forever).
[-n] prevents the last login data file from being updated. This
is necessary if you are using LOGDISP more than once during a script,
otherwise the login data file would be set to the current time and
the second, third, etc. files would never be displayed.
Outputs:
Text file to screen [stdout] if duration has passed OR text file
has been updated since the user's last login.
ERRORLEVEL 0 is no errors were encounted during execution.
ERRORLEVEL 1 for any of the following reasons:
Unknown option.
Bad or missing command line parameter.
Invalid time parameter (1-32768).
Error opening text file to be displayed.
Error reading text file to be displayed.
Bad or missing text file specification
Error opening LST$LOG.DAT file.
Error reading LST$LOG.DAT file.
Writing LST$LOG.DAT file.
/* Update Log */
Attempt to use last login parameter failed because attribute is updated
prior to the execution of the script file. LOGDISP now creates the file
LST$LOG.DAT in the user's MAIL box and uses it to determine the last login.
The file contains a single long interger with a value equal to the minutes
passed from Midnight January 1, 1970 to the last login time.
Examples:
Inserting this line in your system login script will cause the system news
file (sysnews.txt) to be displayed only if it has been 4 hours since the
user last logged in. Pauses for 20 seconds.
#sys:\public\logdisp sys:public\messages\sysnews.txt -w
Inserting this line in your system login script will display a reminder
message to anyone who hasn't logged in in three days. Use it to remind users
to check their E-Mail everyday. Forces them to acknowledge by pressing a key.
#sys:\public\logdisp 4320 sys:public\messages\remind.txt -w0
Inserting these lines in your system login script will cause the system
information file (sysinfo.txt) to be displayed only if it has been 8 hours
since the user's last logged in and the daily system news file (sysnews.???)
if it has been 4 hours since the user's last logged in.
Pauses for 20 seconds for sysinfo and 15 for sysnews viewing.
#sys:\public\logdisp 480 sys:public\messages\sysinfo.txt -w -n
#sys:\public\logdisp sys:public\messages\sysnews.%DAY_OF_WEEK -w15
This program was developed for the federal government using public funds and
is therefore public property. You are free to use, copy and distribute this
program provided you do not charge for other than the cost of duplication.
The program must be distributed with this doc file.